package com.lhkj.ct.meta.modules.psychology.model.bo;

import com.lhkj.ct.meta.modules.psychology.model.entity.TblGaugeAnswer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 提交量表业务类
 */
@Setter
@Getter
public class SubmitGaugeBo implements Serializable {

    @NotEmpty(message = "提交内容不能为空")
    @ApiModelProperty(value = "表单提交信息")
    private Map<String, Object> formData;

    @NotBlank(message = "量表编号不能为空")
    @ApiModelProperty(value = "量表编号")
    private String gaugeId;

    @NotNull(message = "档案信息不能为空")
    @ApiModelProperty(value = "档案信息", hidden = true)
    private SubmitGaugeBo.Patient patient;

    @NotEmpty(message = "原始答卷不能为空")
    @ApiModelProperty(value = "原始答卷")
    private List<TblGaugeAnswer> answers;

    @Setter
    @Getter
    public static class Patient {

        @ApiModelProperty(value = "档案id")
        private String id;

        @ApiModelProperty(value = "姓名")
        private String name;

        @ApiModelProperty(value = "年龄")
        private Integer age;

        /**
         * 这里是字典值
         */
        @ApiModelProperty(value = "性别", notes = "这里是字典值 1,2...")
        private String sex;

        @ApiModelProperty(value = "spm年龄")
        private Double spmAge;
    }
}
